package cn.yuanqiao.archive.chengguojieshou.mapper;

import cn.yuanqiao.archive.chengguojieshou.domain.Yqdaarticulated;
import cn.yuanqiao.archive.chengguojieshou.domain.YqdaarticulatedLog;
import cn.yuanqiao.archive.chengguojieshou.domain.YqdaarticulatedServerLog;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;


/**
 * 挂接Mapper接口
 * 
 * @author yuanqiao
 * @date 2023-06-30
 */
public interface YqdaarticulatedMapper
{
    /**
     * 查询挂接
     * 
     * @param id 挂接主键
     * @return 挂接
     */
    public Yqdaarticulated selectBjyqYqdaarticulatedByID(String id);

    public String getMaxBatchNo(String tableName);

    /**
     * 查询挂接列表
     * 
     * @param bjyqYqdaarticulated 挂接
     * @return 挂接集合
     */
    public List<Yqdaarticulated> selectBjyqYqdaarticulatedList(Yqdaarticulated bjyqYqdaarticulated);

    public List<YqdaarticulatedLog> getArticulatedLog(@Param("id") Long id, @Param("tableName") String tableName);

    public List<YqdaarticulatedServerLog> getServerLogList(@Param("id") Long id, @Param("tableName") String tableName);


    /**
     * 新增挂接
     * 
     * @param bjyqYqdaarticulated 挂接
     * @return 结果
     */
    public int insertBjyqYqdaarticulated(Yqdaarticulated bjyqYqdaarticulated);

    public int insertBjyqYqdaarticulatedLog(YqdaarticulatedLog bjyqYqdaarticulated);

    public int insertBjyqYqdaarticulatedServerLog(YqdaarticulatedServerLog bjyqYqdaarticulated);

    /**
     * 修改挂接
     * 
     * @param bjyqYqdaarticulated 挂接
     * @return 结果
     */
    public int updateBjyqYqdaarticulated(Yqdaarticulated bjyqYqdaarticulated);

    /**
     * 删除挂接
     * 
     * @param id 挂接主键
     * @return 结果
     */
    public int deleteBjyqYqdaarticulatedByID(String id);

    /**
     * 批量删除挂接
     * 
     * @param IDs 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteBjyqYqdaarticulatedByIDs(String[] IDs);

    List<Map<String,Object>> executeSql(String sql);

    String getSingle(String sql);

    int createArticulated(@Param("tableName") String tableName);

    int createArticulatedLog(@Param("tableName") String tableName);

    int createArticulatedServerLog(@Param("tableName") String tableName);
}
